<?php

import('com.yamvc.controller.IAction');

class Action{
	
	protected $_config;
	public function getConfig(){
		return $this->_config;
	}
	public function __construct($config){
		$this->_config=$config;
	}
	
	public function registerMediators(){
		View::instance()->registerMediators($this->_config->getElement("action.view.mediators.mediator"));
	}
	public function registerTemplates(){
		View::instance()->registerTemplates($this->_config->getElement("action.view.templates"));
	}
	public function registerProxyes(){
		Model::instance()->registerProxyes($this->_config->getElement("action.model.proxyes.proxy"));
	}
	
	/// PROXY  ///
	public function getAppInstance(){
		return Application::getAppInstance();
	}
	/**
	 * Enter description here...
	 *
	 * @return Config
	 */
	public function getAppConfig(){
		return $this->getAppInstance()->getConfig();
	}
}

?>